package com.goldgov.code.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.goldgov.code.meta.FieldInfo;

@Mapper
public interface FieldDao {
	
	void addField(FieldInfo field);
	
	void updateField(FieldInfo field);
	
	int deleteField(@Param("ids") String[] ids);
	
	FieldInfo getField(String id);
	
	List<FieldInfo> listField(@Param("moduleID") String moduleID);
	
	long countField(@Param("firstRow") int firstRow,@Param("maxResult") int maxResult);
	
	void updateConstraintList(@Param("fieldID") String fieldID, @Param("isTrue") boolean isTrue);

	void updateConstraintRequired(@Param("fieldID") String fieldID, @Param("isTrue") boolean isTrue);

	void updateConstraintQueryType(@Param("fieldID") String fieldID, @Param("queryType") String queryType);
	
}